<h1><?php echo $this->translate("Loan master") ?></h1>
<p><?php echo $this->replaceEmpty($this->LoanMasters->d->ClientFullName,$this->LoanMasters->d->GroupName) ?>

<div style="width: 10cm; float: left;">    

<hr class="view" style="margin-top: 0;" />

<table cellspacing="0" class="view">
    <tbody>
        <tr>
            <th><?php echo $this->translate("Master code") ?></th>
            <td><?php echo $this->LoanMasters->d->LoanMasterId ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Borrower") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->ClientFullName,$this->LoanMasters->d->GroupName) ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Amount") ?></th>
            <td><?php echo $this->LoanMasters->d->Amount ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Installments") ?></th>
            <td><?php echo $this->LoanMasters->d->Installments ?> / <?php echo $this->LoanMasters->d->PaymentFrequency ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Status") ?></th>
            <td><?php echo $this->LoanMasters->d->Status ?></td>
        <tr>
            <th><?php echo $this->translate("Check number") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->CheckNumber,'-') ?></td>
        </tr>    
        <tr>
            <th><?php echo $this->translate("Product line") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->ProductLineName,'-') ?></td>
        </tr>    
        <tr>
            <th><?php echo $this->translate("Program name") ?></th>
            <td><?php echo $this->LoanMasters->d->ProgramName ?></td>
        </tr> 
    </tbody>
</table>

<hr class="view" />
    
<table cellspacing="0" class="view">
    <tbody>
        <tr>
            <th><?php echo $this->translate("Tent. delivery date") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->TentativeDeliveryDate,'-') ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Tent. 1st. pmt. date") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->TentativeFirstPaymentDate,'-') ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Delivery date") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->DeliveryDate,'-') ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Exp. 1st. pmt. date") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->ExpectedFirstPaymentDate,'-') ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Exp. cancel date") ?></th>
            <td><?php echo $this->replaceEmpty($this->LoanMasters->d->ExpectedCancelDate,'-') ?></td>
        </tr>
    </tbody>
</table>

<hr class="view" />
    
<table cellspacing="0" class="view">
    <tbody>
        <tr>
            <th><?php echo $this->translate("Branch") ?></th>
            <td><?php echo $this->LoanMasters->d->LocationName ?></td>
        </tr>
        <tr>
            <th><?php echo $this->translate("Loan officer") ?></th>
            <td><?php echo $this->LoanMasters->d->OfficerFullName ?></td>
        </tr>
    </tbody>
</table>

</div>

<div style="float: left;padding-left: 10px; ">
    <table cellpadding="0" cellspacing="0" border="0">
        <?php foreach($this->LoanMasters->r->loans as $loan) : ?>
        <tr>
        <td><img style="margin: 0px 10px 0 0; width:1cm;"  src="/default/photo/thumb/cat/i/id/<?php echo $loan->ClientId ?>" /></td>
        <td>
            <?php echo $loan->ClientFullName ?><br />
            <?php echo $loan->LoanId . '/' . $loan->Status ?> - <?php echo $loan->Principal ?>
        </td>
        </tr>
    <?php endforeach; ?>
    </table>
</div>
